package yunquan.wang.modules.base.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import yunquan.wang.base.domain.IdEntity;

/**
 * 行政级别
 * 
 * @author Administrator
 * 
 */
@Entity
@Table(name = "BASE_ADMINRANK")
public class AdminRank extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5680784590019343239L;
	@Column(name = "NAME")
	private String name; 
	@Column(name = "INFO")
	private String info;// 级别说明
	@Column(name = "RANK")
	private Byte rank;// 级别等级，越小等级越高
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "adminRank")
	private Set<Position> positions = new HashSet<Position>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Byte getRank() {
		return rank;
	}

	public void setRank(Byte rank) {
		this.rank = rank;
	}

	public Set<Position> getPositions() {
		return positions;
	}

	public void setPositions(Set<Position> positions) {
		this.positions = positions;
	}

}
